<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
{{ stu_d }}
<table border="1px">
    <tr>
        <td>id</td>
        <td>name</td>
        <td>age</td>
        <td>gender</td>
    </tr>
    {% for sid in stu_d %}
        <tr>
            <td>{{ sid }}</td>
            <td>{{ stu_d[sid].name }}</td>
            <td>{{ stu_d[sid].get("age") }}</td>
            <td>{{ stu_d.get(sid).gender }}</td>
        </tr>
    {% endfor %}

</table>
</body>
</html>